//
//  AccessUtil.m
//  Weike
//
//  Created by leirz on 14-4-15.
//  Copyright (c) 2014年 winupon. All rights reserved.
//


#import "AppUtils.h"
#import "AccessUtil.h"


@implementation AccessUtil

+ (NSString *)getDomain
{
//    return [NSString stringWithFormat:@"https://%@-%@%@/",BUCKET,APP_ID_TX,YUN];
    return nil;
}

+ (NSString *)getYunImageUrl:(NSString *)imgurl
{
//    if([AppUtils isEmpty:imgurl]){
//        return nil;
//    }
//    NSString *s = [NSString stringWithFormat:@"%@%@", [AccessUtil getDomain], imgurl];
//    if ([AppUtils getNetWorkType] == NetTypeWWAN && ![imgurl hasSuffix:@"/middle"] && ![imgurl hasSuffix:@"/small"] && ![imgurl hasSuffix:@"/big"] && ![imgurl hasSuffix:@"/crop"]) {
//        s = [NSString stringWithFormat:@"%@/middle", s];
//    }
    return nil;
}

//+ (NSURL *)getHeadLargeImage:(NSString *)url
//{
//    if ([AccessUtil hasSmallSuffix:url]) {
//        return [AccessUtil getLargeImage:url];
//    }
//    return [NSURL URLWithString:url];
//}
//
//+ (BOOL)hasSmallSuffix:(NSString *)url
//{
//    NSRange range = [url rangeOfString:@"/" options:NSBackwardsSearch];
//    range.length += 2;
//    return [[url substringWithRange:range] isEqualToString:@"/s."];
//}
//
//+ (NSURL *)getImageUrl:(NSString *)url fileName:(NSString *)fileName
//{
//    NSRange range = [url rangeOfString:@"/" options:NSBackwardsSearch];
//    range.location += 1;
//    url = [url stringByReplacingCharactersInRange:range withString:fileName];
//    return [NSURL URLWithString:url];
//}
//
//+ (NSURL *)getLargeImage:(NSString *)url
//{
//    return [self getImageUrl:url fileName:@"l"];
//}
//
//+ (NSURL *)getMiddleImage:(NSString *)url
//{
//    return [self getImageUrl:url fileName:@"m"];
//}
//
//+ (NSURL *)getSmallImage:(NSString *)url
//{
//    return [self getImageUrl:url fileName:@"s"];
//}
//
//+ (BOOL)isHttpUrl:(NSString *)url
//{
//    return [url hasPrefix:@"http"];
//}


@end
